﻿/*-----------------------------------------------
// File: FirstRoundLeaveState.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;

namespace Battle.View
{
    public class FirstRoundLeaveState : RoundLeaveState 
    {
        public BattleViewFirstCtrl firstViewCtrl {
            get { return ctrl.viewCtrl as BattleViewFirstCtrl; }
        }

        public FirstRoundLeaveState(BattleRoundState state, FirstBattleRoundCtrl ctrl) : base(state, ctrl) { }


        public override void ConfirmRoundLeave(BattleCamp nextRunCamp)
        {
            base.ConfirmRoundLeave(nextRunCamp);
            if (firstViewCtrl.curGuideStep == BattleViewFirstCtrl.FirstBattleGuideStep.NormalSkillAllCasting) {
                firstViewCtrl.curGuideStep = BattleViewFirstCtrl.FirstBattleGuideStep.UltimateSkillNeedFirstCast;
                firstViewCtrl.isFirstUltimateCanCast = true;
                BattleManager.Instance.battleEngine.compute.data.attacker.angerNum = BattleManager.Instance.battleEngine.compute.data.attacker.maxAngerNum;
                BattleManager.Instance.battlePanel.AngerBarAni();
            }
        }
    }
}